'''
Created on May 15, 2012

@author: Vu Dao
'''
from selenium import webdriver
from Interface.administratorPage import xpathAddNewArticleButton,\
    xpathArticleManagerButton

# click on 'Add New Article' button
def clickOnAddNewArticleBtn(self):
#    browser = webdriver.Ie()
    browser = self.browser
    element = browser.find_element_by_xpath(xpathAddNewArticleButton())
    element.click()
    browser.implicitly_wait(60)
    
# click on "Article Manager" button
def clickOnArticleManagerBtn(self):
#    browser = webdriver.Ie()
    browser = self.browser
    element = browser.find_element_by_xpath(xpathArticleManagerButton())
    element.click()
    browser.implicitly_wait(60)